package com.distribution.system.domain.converter;


import com.distribution.system.domain.bo.AddressNameBo;
import com.distribution.system.domain.dto.ChoosePhoneDTO;
import com.distribution.system.domain.dto.PlaceOrderDTO;
import com.distribution.system.domain.entity.CmccDaOrder;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.time.LocalDateTime;
import java.util.Objects;

@Mapper(componentModel = "spring", imports = {LocalDateTime.class, Objects.class})
public interface AddressNameInfoConverter {

    AddressNameBo choosePhoneDtoToAddressNameBo(ChoosePhoneDTO choosePhoneDTO);

    @Mapping(target = "addressDistrict", source = "cmccDaOrder.addressArea")
    AddressNameBo orderToAddressNameBo(CmccDaOrder cmccDaOrder);
}
